import request from '@/config/axios'

// 专业表-就业方向 VO
export interface MajorObtainVO {
  id: number // 主键id
  majorId: number // 专业id
  obtainName: string // 就业名称
  obtainNum: string // 就业占比
}

// 专业表-就业方向 API
export const MajorObtainApi = {
  // 查询专业表-就业方向分页
  getMajorObtainPage: async (params: any) => {
    return await request.get({ url: `/member/major-obtain/page`, params })
  },

  // 查询专业表-就业方向详情
  getMajorObtain: async (id: number) => {
    return await request.get({ url: `/member/major-obtain/get?id=` + id })
  },

  // 新增专业表-就业方向
  createMajorObtain: async (data: MajorObtainVO) => {
    return await request.post({ url: `/member/major-obtain/create`, data })
  },

  // 修改专业表-就业方向
  updateMajorObtain: async (data: MajorObtainVO) => {
    return await request.put({ url: `/member/major-obtain/update`, data })
  },

  // 删除专业表-就业方向
  deleteMajorObtain: async (id: number) => {
    return await request.delete({ url: `/member/major-obtain/delete?id=` + id })
  },

  // 导出专业表-就业方向 Excel
  exportMajorObtain: async (params) => {
    return await request.download({ url: `/member/major-obtain/export-excel`, params })
  }
}